Optimal. Leaf size=43 \[ \frac {2 a^2 \cos (c+d x)}{d}-2 a^2 x+\frac {\sec (c+d x) (a \sin (c+d x)+a)^2}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.06, antiderivative size = 43, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.080, Rules used = {2855, 2638} \[ \frac {2 a^2 \cos (c+d x)}{d}-2 a^2 x+\frac {\sec (c+d x) (a \sin (c+d x)+a)^2}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2638
Rule 2855
Rubi steps
\begin {align*} \int \sec (c+d x) (a+a \sin (c+d x))^2 \tan (c+d x) \, dx &=\frac {\sec (c+d x) (a+a \sin (c+d x))^2}{d}-(2 a) \int (a+a \sin (c+d x)) \, dx\\ &=-2 a^2 x+\frac {\sec (c+d x) (a+a \sin (c+d x))^2}{d}-\left (2 a^2\right ) \int \sin (c+d x) \, dx\\ &=-2 a^2 x+\frac {2 a^2 \cos (c+d x)}{d}+\frac {\sec (c+d x) (a+a \sin (c+d x))^2}{d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] time = 0.37, size = 90, normalized size = 2.09 \[ \frac {(a \sin (c+d x)+a)^2 \left (-2 (c+d x)+\cos (c+d x)+\frac {4 \sin \left (\frac {1}{2} (c+d x)\right )}{\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )}\right )}{d \left (\sin \left (\frac {1}{2} (c+d x)\right )+\cos \left (\frac {1}{2} (c+d x)\right )\right )^4} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.44, size = 101, normalized size = 2.35 \[ -\frac {2 \, a^{2} d x - a^{2} \cos \left (d x + c\right )^{2} - 2 \, a^{2} + {\left (2 \, a^{2} d x - 3 \, a^{2}\right )} \cos \left (d x + c\right ) - {\left (2 \, a^{2} d x - a^{2} \cos \left (d x + c\right ) + 2 \, a^{2}\right )} \sin \left (d x + c\right )}{d \cos \left (d x + c\right ) - d \sin \left (d x + c\right ) + d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.19, size = 89, normalized size = 2.07 \[ -\frac {2 \, {\left ({\left (d x + c\right )} a^{2} + \frac {2 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 3 \, a^{2}}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1}\right )}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.32, size = 76, normalized size = 1.77 \[ \frac {a^{2} \left (\frac {\sin ^{4}\left (d x +c \right )}{\cos \left (d x +c \right )}+\left (2+\sin ^{2}\left (d x +c \right )\right ) \cos \left (d x +c \right )\right )+2 a^{2} \left (\tan \left (d x +c \right )-d x -c \right )+\frac {a^{2}}{\cos \left (d x +c \right )}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 1.07, size = 57, normalized size = 1.33 \[ -\frac {2 \, {\left (d x + c - \tan \left (d x + c\right )\right )} a^{2} - a^{2} {\left (\frac {1}{\cos \left (d x + c\right )} + \cos \left (d x + c\right )\right )} - \frac {a^{2}}{\cos \left (d x + c\right )}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 9.18, size = 117, normalized size = 2.72 \[ -2\,a^2\,x-\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (2\,a^2\,\left (d\,x-1\right )-2\,a^2\,d\,x\right )-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,\left (2\,a^2\,\left (d\,x-2\right )-2\,a^2\,d\,x\right )-2\,a^2\,\left (d\,x-3\right )+2\,a^2\,d\,x}{d\,\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-1\right )\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ a^{2} \left (\int \sin {\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}\, dx + \int 2 \sin ^{2}{\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}\, dx + \int \sin ^{3}{\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}\, dx\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________